Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demonstrate that the HTTP API returns "Internal Server Error" when attempting to encrypt multiple transaction metadata messages. #4651

Merged

Conversation

jonathanknowles
Copy link
Member

@jonathanknowles jonathanknowles commented Jun 27, 2024

Related issue

Description

This PR demonstrates that if:

  • the user calls the constructTransaction HTTP API endpoint
  • the metadata field is populated with metadata to be encrypted according to CIP-83

And if:

  • the included metadata map includes more than one message with a msg key
  • the detailed JSON schema option TxMetadataDetailedSchema is used.

Then the HTTP API will return "Internal Server Error".

How to reproduce the failure

With a fresh checkout of the branch in this PR, run:

$ nix develop
$ just conway-integration-tests-match "encrypt multiple metadata messages"

Example failure links

Example failure log extract

only one 'msg' field expected
CallStack (from HasCallStack):
  error, called at src/Cardano/Wallet/Api/Http/Shelley/Server.hs:3207:24 in cardano-wallet-api-2024.5.5-AKdt1G4fjDDEhVlTTGjQVf:Cardano.Wallet.Api.Http.Shelley.Server
From the following response: Left
    ( DecodeFailure "Something went wrong" "Unexpected "Something went wrong", expecting JSON value" )
While verifying value:
  ( Status
      { statusCode = 500
      , statusMessage = "Internal Server Error"
      }
  , Left
      ( DecodeFailure "Something went wrong" "Unexpected "Something went wrong", expecting JSON value" )
  )
expected: Status {statusCode = 202, statusMessage = "Accepted"}
 but got: Status {statusCode = 500, statusMessage = "Internal Server Error"}

@jonathanknowles jonathanknowles changed the title Demonstrate HTTP API Internal Server Error on attempt to encrypt multiple tx metadata messages. Demonstrate HTTP API Internal Server Error on attempt to encrypt multiple transaction metadata messages. Jun 27, 2024
@jonathanknowles jonathanknowles changed the title Demonstrate HTTP API Internal Server Error on attempt to encrypt multiple transaction metadata messages. Demonstrate HTTP API returns "Internal Server Error" on attempt to encrypt multiple transaction metadata messages. Jun 27, 2024
@jonathanknowles jonathanknowles changed the title Demonstrate HTTP API returns "Internal Server Error" on attempt to encrypt multiple transaction metadata messages. Demonstrate that the HTTP API returns "Internal Server Error" when attempting to encrypt multiple transaction metadata messages. Jun 27, 2024
@jonathanknowles jonathanknowles self-assigned this Jun 27, 2024
@jonathanknowles jonathanknowles marked this pull request as draft June 27, 2024 05:27
@paweljakubas
Copy link
Contributor

I will pick it up this one now

@paweljakubas paweljakubas force-pushed the jonathanknowles/metadata-encryption-api-run-time-error branch from dcf1060 to 4f5bc91 Compare June 28, 2024 13:37
@paweljakubas paweljakubas marked this pull request as ready for review June 28, 2024 13:37
@paweljakubas paweljakubas force-pushed the jonathanknowles/metadata-encryption-api-run-time-error branch from 6f9cb2b to 4afcd9e Compare June 29, 2024 11:29
@paweljakubas paweljakubas added this pull request to the merge queue Jun 29, 2024
Merged via the queue into master with commit c49fea5 Jun 29, 2024
3 checks passed
@paweljakubas paweljakubas deleted the jonathanknowles/metadata-encryption-api-run-time-error branch June 29, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants